Fonts used in computers may be representable using a vector description describing the outline of a character shape. Fonts are generally grouped together into a collection of fonts known as a font family. The fonts within the font family are related in its design but with some variation applied. Example variations that are common include bold, italic and bold italic variations. Typically, each font variation is created by a human font designer and separate font files for each variation are produced. Often a master font without any variations is the regular font.
Typically when displayed text requires emphasis, it is not uncommon to utilise an alternative font style such as italics to display text. For example, when using HTML for marking up text to be displayed within web-browsers, the <em> tag is used to emphasise text styled in the italic font variation. An italic font style typically slants slightly to the right and may contain cursive letterforms. Another stylistic form that is often used either as a substitute or the starting design for italic fonts is the oblique style which features only a right slant without the cursive letterforms that are present for lower-case characters.
FIGS. 2A and 2B show an example of shear transformation that is often utilised to automatically produce oblique fonts. FIG. 2A shows an example uppercase character “T” 201 in regular style (non-oblique). Shown around the character 201 is a rectangular box 202 to illustrate the change to the bounds of shapes as a result of an oblique transformation. FIG. 2B shows an oblique variant of the character 201 shown in FIG. 2A produced using shear transformation. The sheared character “T” 203 is shown slanted to the right in FIG. 2B, with the surrounding rectangular box 202 being transformed to produce a parallelogram 204. In the example of FIG. 2B, the left edge 207 and right edge 204 of the parallelogram are slanted by the slant angle ϕ205 relative to the vertical axis 206. While the typical shear transformation achieves the purpose of producing a slanted font, performing slanting alone results in stroke widths being inadvertently modified.
An outline definition 301 for the character 201 of FIG. 2A is shown in FIG. 3A. The width of the vertical stroke 302 of the character “T” 201, which is denoted as w, corresponds to the perpendicular distance between the two vertical edges. Upon applying a slant transformation, to produce slanted outline definition 303 as shown in FIG. 3B, measured horizontal distance 304 is preserved by the slant transformation with a value of w. However, the correct stroke width is perpendicular distance 305, which is denoted as wp. As seen in FIG. 3B, stroke width wp is different to stroke width w.
Similarly, when a slant operation is applied to other characters which feature curves, such as character 400 shown in FIGS. 4A and 4B, a change in stroke width results. FIG. 4A is the lowercase character “o” 400 composed of an outer circle 401 and an inner circle 402. Measurements made between the outer and inner circles 401 and 402 respectively produce a stroke width of w at positions 403 and 404 shown in FIG. 4A. However, after slanting character 400, a resultant outline 410 shown in FIG. 4B comprises slanted outer curve 405 and inner curve 406.
As seen in FIG. 4B, when performing measurements of features similar to that at positions 403 and 404 but situated in the slanted outline 410 width value w1 at position 407 is different to width value w2, In particular, it can be determined that w1>w and w2<w.
FIG. 5 shows two possible candidates for a slanted character generated for the letter “o”. An ideal transformation should result in an outer curve 501 and an inner curve 502 as shown in FIG. 5 where stroke width is consistent between the two curves 501 and 502. However, a typical shear transformation results in outer curve 503 and inner curve 504 having inconsistent stroke widths. The creation of italic fonts often requires corrections to be applied to produce results similar to curves 503 and 504 resulting from a slant transformation. Such transformations become more complicated for fonts designed with variable stroke weights.
Thus, a need exists for a method of producing oblique characters that preserve parameters used to author fonts.